﻿using System;
using System.Threading;

using SBPweb.PlAzureNet.Server.Library.Processes;

namespace TestConsoleApp
{

    class Program
    {

        private const int TickInterval = 60000;

        private static LotteryProcess process = new LotteryProcess();

        static void Main(string[] args)
        {
            process.Start();

            Thread t = new Thread(new ThreadStart(WaitForTick));
            t.Start();

            Console.ReadKey();
            t.Abort();
            
            process.Stop();
        }

        private static void WaitForTick()
        {
            while (true)
            {
                process.Tick();

                Thread.Sleep(TickInterval);
            }
        }

    }

}